#ifndef RESOURCEMANAGERBD_H
#define RESOURCEMANAGERBD_H

#include "resourcemanager.h"
#include "bookmarklist.h"
#include "mangalist.h"
#include <QtSql>

class ResourceManagerBD : public ResourceManager
{
public:
    virtual ResourceList * getResources() =0;
    virtual bool addResource(Resource * r) =0;
    virtual bool updateResource(Resource * r)=0;
    virtual bool deleteResource(Resource * r)=0;
    virtual QString getLastError()=0;
    static ResourceManagerBD * getMangaInstance();
    static ResourceManagerBD * getBookmarkInstance();

protected:
    ResourceManagerBD();
    static const QString hostname;
    static const QString user;
    static const QString pswd;
    static const QString DBName;

    QSqlDatabase m_db;
};

#endif // RESOURCEMANAGERBD_H
